package org.reliablesource.prism.ui.workbench.views;

/**
 *
 *  Copyright (c) 2006, Reliable Source, Inc. All Rights Reserved
 *
 *	Created on: Mar 11, 2006
 *	@author Dennis Park <a href="mailto:dennis.park@gmail.com">dennis.park@gmail.com</a>
 *
 */

import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.reliablesource.prism.ui.plugin.PrismPlugin;
import org.reliablesource.prism.ui.viewers.ImageViewer;

public class ImageViewPart extends ViewPart {
	public final static String VIEW_ID = "org.reliablesource.prism.ui.workbench.views.imageview";

	protected ImageViewer imageViewer;

	public void createPartControl(Composite parent) {
		imageViewer = new ImageViewer(parent);

		// Listen only to selection in the Navigator.
		getSite().getPage().addSelectionListener(NavigatorViewPart.VIEW_ID,
				imageViewer);
		// imageComposite.registerContext(CONTAINER_ID);
		PrismPlugin.getDefault().addWidget(VIEW_ID, parent);
		PrismPlugin.getDefault().dumpCompositeContextMap();
	}

	public void setFocus() {
		imageViewer.getControl().setFocus();
	}
}
